OBJECT = {}
Objects = {}

OBJ_INTERACT = 1
OBJ_INTERACTQUEST = 2
OBJ_LOOTQUEST = 3
OBJ_LOOT = 4
OBJ_GAMEOBJECTIVE = 5
	
OBJECT.__index = OBJECT

OBJECT.ObjectID = -1
OBJECT.Name = "Base Object"
OBJECT.Type = OBJ_INTERACT
OBJECT.Model = "models/props_junk/Rock001a.mdl"
OBJECT.ModelSkin = 0
OBJECT.Quest = 0
OBJECT.LootTable = {}
OBJECT.Casted = false 
OBJECT.CastTime = 0

function OBJECT:ApplyToEnt( ent )
	ent.Model = self.Model
	ent.ObjectID = self.ObjectID
	ent.Name = self.Name
	ent.Type = self.Type
	ent.Quest = self.Quest
	ent.LootTable = self.LootTable
	ent.CastTime = self.CastTime
	ent:SetModel(ent.Model)
end

local _R = debug.getregistry( )
	_R.Objects = OBJECT

local n, m

local curindex = 1

for n, m in ipairs( file.Find( "gamemodes/RPGDM/gamemode/objects/*.lua", "MOD" ) ) do
	
	print( "objects/" .. m)
	AddCSLuaFile( "objects/" .. m )
	include( "objects/" .. m)
		
	local OBJECT = table.Copy(_R.Obj)
	
	table.insert( Objects, OBJECT )
		curindex = curindex + 1
end

